const mongoose = require('mongoose');

const emissionFactorSchema = new mongoose.Schema({
  activityType: {
    type: String,
    required: true,
    unique: true
  },
  unitType: {
    type: String,
    enum: ['time', 'distance', 'quantity'],
    required: true
  },
  co2ePerUnit: {
    type: Number,
    required: true
  },
  reductionTips: [String]
});

module.exports = mongoose.model('EmissionFactor', emissionFactorSchema);